#set($style = "")
#set($quote = '"')

#if($HEIGHT)
    #if(!$style.contains("style"))
        #set($style = "style=$quote")
    #end

    #if(!$HEIGHT.contains("%"))
        #set($HEIGHT = "${HEIGHT}px") 
    #end

    #set($style = "${style}height:${HEIGHT};")
#end

#if($WIDTH)
    #if(!$style.contains("style"))
        #set($style = "style=$quote")
    #end

    #if(!$WIDTH.contains("%"))
        #set($WIDTH = "${WIDTH}px")
    #end

    #set($style = "${style}width:${WIDTH};")
#end

#if($FLOAT)
    #if(!$style.contains("style"))
        #set($style = "style=$quote")
    #end

    #if($FLOAT.contains("left") || $FLOAT.contains("right"))
        #set($style = "${style}float:${FLOAT};")
    #end
#end

#if($style)
    #set($style="${style}$quote")
#end

#if($ID)
    #set($PARSEDURL = "http://www.furious-gaming.com/${ID}.f2g")
#else
    #set($PARSEDURL = $URL)
#end

#if(($LIGHTBOX && $LIGHTBOX != "false") || !$LIGHTBOX)
    <a href="javascript:DisplayImage('$PARSEDURL','$INNERTEXT', null);" rel="nofollow"><img src='$PARSEDURL?thumb=true' $style alt='$INNERTEXT' title='$INNERTEXT'/></a>
#else
    <a href="$PARSEDURL" rel="nofollow" target="_blank"><img src='$PARSEDURL' $style alt='$INNERTEXT' title='$INNERTEXT'/></a>
#end